package br.unifesp.lma.chamada.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import br.unifesp.lma.chamada.model.entity.Aluno;
import br.unifesp.lma.chamada.model.entity.Disciplina;

@Repository
public class AlunoDAO extends BaseDAO<Aluno> {

	public AlunoDAO() {
		super(Aluno.class);
	}

	@Override
	public List<Aluno> getAll() {
		return super.query().order("nome").list();
	}
	
	public List<Aluno> listByProfessor(Long professorId) {
		return super.query().order("nome").filter("professorId", professorId).list();
	}
}
